package com.neu.flashmall.order.mapper;

import com.neu.flashmall.order.entity.OmsOrder;
import com.neu.flashmall.order.vo.OmsOrderVo;
import com.neu.flashmall.order.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 12615
* @description 针对表【oms_order(订单)】的数据库操作Mapper
* @createDate 2022-07-16 10:47:22
* @Entity com.neu.flashmall.order.entity.OmsOrder
*/
@Mapper
public interface OmsOrderMapper {

    int deleteByPrimaryKey(Long id);

    int insert(OmsOrder record);

    int insertSelective(OmsOrder record);

    OmsOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(OmsOrder record);

    int updateByPrimaryKey(OmsOrder record);

    List<OmsOrderVo> selectAll();

    List<OmsOrderVo> selectOrderByStatus(Integer status);

    OmsOrderVo getOrderVoById(Long orderId);

    OmsOrder getOrderByOrderCode(String orderCode);

    List<OmsOrder> selectByUserId(@Param("id") Long userId, @Param("pageSize") Integer pageSize, @Param("pageNum") Integer pageNum);

    List<OmsOrder> selectAllByUserAndStatus(@Param("id") Long userId,
                                      @Param("pageSize") Integer pageSize,
                                      @Param("pageNum") Integer pageNum,
                                      @Param("status") Integer status);

    int changeStatus(@Param("id") Long id,@Param("status") Integer status);

    int deleteFalse(Long id);

}
